Dynomotion

Group: DynoMotion Message: 13895 From: David Strip Date: 10/15/2016
Subject: Multiple G32 commands in program
Attachments :
    We're building a specialized machine that will require synchronization between a spinning table and a rotary axis. I've built a simplified testbed that looks like this:


    I wrote a simple program that looks like this. Assume the arm starts at -35:
    F80
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35

    The result is the figure drawn above. Here is a closeup of where the path ends:



    As you can see, there is a slight drift by the time the path closes.

    A new program, drawing the path four times in a row results in this figure:


    The path continues to drift with each rotation.

    By adding a G0 at the end of each sequence of 8 steps the path resyncs each time:


    The problem I have is that it takes about two revs following the G0 to start the next G32. Is there any way, perhaps changing the trajectory planner settings, that will reduce or eliminate the drift on each revolution?


    --
    Group: DynoMotion Message: 13898 From: Tom Kerekes Date: 10/15/2016
    Subject: Re: Multiple G32 commands in program

    Hi David,

    A spirograph!

    I think the issue has to do with A Axis Acceleration.  The program assumes that to move the A Axis 10 degrees at 80 degrees/rev will require exactly 1/8 of a rev.  Unfortunately the A Axis can not start at 80degrees/rev it must accelerate up to that speed (and decelerate to a stop at the end) which results in extra time and spindle motion.  Setting the A Acceleration to infinity in the Trajectory Planner Settings should eliminate the problem but is probably impractical.

    The other option is to increase the Feed Rate slightly or reduce the distance of 10 degrees slightly such that the motion takes exactly 1/8 of a Spindle Revolution.

    Does this sound reasonable?

    You didn't specify your A Axis Acceleration Limit.  Given that it should be possible to calculate Speed or Distance to make things work out based on the acceleration formulas V=A*T and D=1/2 A T^2

    HTH

    Regards

    TK



    On 10/15/2016 8:42 AM, David Strip David@... [DynoMotion] wrote:
     

    We're building a specialized machine that will require synchronization between a spinning table and a rotary axis. I've built a simplified testbed that looks like this:


    I wrote a simple program that looks like this. Assume the arm starts at -35:
    F80
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35
    G32 A-25
    G32 A-35

    The result is the figure drawn above. Here is a closeup of where the path ends:



    As you can see, there is a slight drift by the time the path closes.

    A new program, drawing the path four times in a row results in this figure:


    The path continues to drift with each rotation.

    By adding a G0 at the end of each sequence of 8 steps the path resyncs each time:


    The problem I have is that it takes about two revs following the G0 to start the next G32. Is there any way, perhaps changing the trajectory planner settings, that will reduce or eliminate the drift on each revolution?


    --

    Group: DynoMotion Message: 13899 From: David Strip Date: 10/15/2016
    Subject: Re: Multiple G32 commands in program
    On 10/15/2016 11:14 AM, Tom Kerekes tk@... [DynoMotion] wrote:

    Hi David,

    A spirograph!

    I think the issue has to do with A Axis Acceleration.  The program assumes that to move the A Axis 10 degrees at 80 degrees/rev will require exactly 1/8 of a rev.  Unfortunately the A Axis can not start at 80degrees/rev it must accelerate up to that speed (and decelerate to a stop at the end) which results in extra time and spindle motion.  Setting the A Acceleration to infinity in the Trajectory Planner Settings should eliminate the problem but is probably impractical.

    The other option is to increase the Feed Rate slightly or reduce the distance of 10 degrees slightly such that the motion takes exactly 1/8 of a Spindle Revolution.

    Does this sound reasonable?

    You didn't specify your A Axis Acceleration Limit.  Given that it should be possible to calculate Speed or Distance to make things work out based on the acceleration formulas V=A*T and D=1/2 A T^2

    HTH

    Regards


    Spirograph came to mind for me too the first time I drew a figure.
    Your explanation makes perfect sense to me - I suspected something along those lines, though I hadn't stopped to check if the accel values would explain the situation. I did consider trying to back out an appropriate feed rate to get the "right answer", but thought I'd look for other solutions first.

    How do I set the the acceleration to infinite? Just use a very high value, or is there an specific setting that indicates infinite? I looked in the manual but can't seem to find it.

    As it turns out, in the actual machine, the axis that's holding the pen in the testbed will be moving at a s constant velocity, drawing a spiral across the table. The "axis" mounted on the end of the arm can be best thought of as a sort of marker, where each step command drives a solenoid. Thus, it truly has infinite acceleration (and jerk). Thus, in practice, the sequence of G32s will continue to move the arm at constant velocity, so the acceleration/jerk won't matter, and the axis that will have changing values (the solenoid on the arm) has infinite acceleration, so your suggestion is right on the mark.



    --
    Group: DynoMotion Message: 13900 From: Tom Kerekes Date: 10/15/2016
    Subject: Re: Multiple G32 commands in program

    Hi David,

    Yes I was thinking to just set huge values to approximate infinity.  It seems the KMotionCNC Screen limits values to 1e9 degrees/sec2.

    I'm not sure I understand the "steps" driving the solenoid.  Is that a dummy axis where a C Program detects movement and commands a Solenoid?  If so you might consider synchronous I/O Commands instead.   See:

    http://dynomotion.com/Help/KMotionCNC/SynchronousIOCommands.htm

    Regards

    TK



    On 10/15/2016 11:23 AM, David Strip David@... [DynoMotion] wrote:
     

    On 10/15/2016 11:14 AM, Tom Kerekes tk@... [DynoMotion] wrote:

    Hi David,

    A spirograph!

    I think the issue has to do with A Axis Acceleration.  The program assumes that to move the A Axis 10 degrees at 80 degrees/rev will require exactly 1/8 of a rev.  Unfortunately the A Axis can not start at 80degrees/rev it must accelerate up to that speed (and decelerate to a stop at the end) which results in extra time and spindle motion.  Setting the A Acceleration to infinity in the Trajectory Planner Settings should eliminate the problem but is probably impractical.

    The other option is to increase the Feed Rate slightly or reduce the distance of 10 degrees slightly such that the motion takes exactly 1/8 of a Spindle Revolution.

    Does this sound reasonable?

    You didn't specify your A Axis Acceleration Limit.  Given that it should be possible to calculate Speed or Distance to make things work out based on the acceleration formulas V=A*T and D=1/2 A T^2

    HTH

    Regards


    Spirograph came to mind for me too the first time I drew a figure.
    Your explanation makes perfect sense to me - I suspected something along those lines, though I hadn't stopped to check if the accel values would explain the situation. I did consider trying to back out an appropriate feed rate to get the "right answer", but thought I'd look for other solutions first.

    How do I set the the acceleration to infinite? Just use a very high value, or is there an specific setting that indicates infinite? I looked in the manual but can't seem to find it.

    As it turns out, in the actual machine, the axis that's holding the pen in the testbed will be moving at a s constant velocity, drawing a spiral across the table. The "axis" mounted on the end of the arm can be best thought of as a sort of marker, where each step command drives a solenoid. Thus, it truly has infinite acceleration (and jerk). Thus, in practice, the sequence of G32s will continue to move the arm at constant velocity, so the acceleration/jerk won't matter, and the axis that will have changing values (the solenoid on the arm) has infinite acceleration, so your suggestion is right on the mark.



    --

    Group: DynoMotion Message: 13901 From: David Strip Date: 10/15/2016
    Subject: Re: Multiple G32 commands in program
    On 10/15/2016 12:52 PM, Tom Kerekes tk@... [DynoMotion] wrote:

    I'm not sure I understand the "steps" driving the solenoid.  Is that a dummy axis where a C Program detects movement and commands a Solenoid?  If so you might consider synchronous I/O Commands instead.   See:

    http://dynomotion.com/Help/KMotionCNC/SynchronousIOCommands.htm

    Regards


    The solenoid appears to the KFlop to be just another stepper. Our objective is to coordinate cycles of the solenoid with actions on other axes. Let's say we've configured the solenoid "axis" as axis A and as having 100 steps per inch. Then if I want 50 evenly spaced cycles of the solenoid while the x-axis moves 2.7 inches, I just write
    G1 X2.7 A.50
    This produces 50 evenly spaced cycles of the solenoid as the x-axis traverses the 2.7", which is precisely what we're looking for.

    --
    Group: DynoMotion Message: 13902 From: Tom Kerekes Date: 10/15/2016
    Subject: Re: Multiple G32 commands in program

    Clever


    On 10/15/2016 12:17 PM, David Strip David@... [DynoMotion] wrote:
     

    On 10/15/2016 12:52 PM, Tom Kerekes tk@... [DynoMotion] wrote:

    I'm not sure I understand the "steps" driving the solenoid.  Is that a dummy axis where a C Program detects movement and commands a Solenoid?  If so you might consider synchronous I/O Commands instead.   See:

    http://dynomotion.com/Help/KMotionCNC/SynchronousIOCommands.htm

    Regards


    The solenoid appears to the KFlop to be just another stepper. Our objective is to coordinate cycles of the solenoid with actions on other axes. Let's say we've configured the solenoid "axis" as axis A and as having 100 steps per inch. Then if I want 50 evenly spaced cycles of the solenoid while the x-axis moves 2.7 inches, I just write
    G1 X2.7 A.50
    This produces 50 evenly spaced cycles of the solenoid as the x-axis traverses the 2.7", which is precisely what we're looking for.

    --